package com.qf.test;

import com.qf.bean.Student;
import com.qf.dao.impl.StudentDaoImpl;

import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * 2019/11/5
 * Administrator
 * mybatis001
 * 面向对象面向君  不负代码不负卿
 */
public class Demo1 {
    //事务
    public static void main(String[] args) {
        StudentDaoImpl studentDao = new StudentDaoImpl();
       /* List<Student> findall = studentDao.findall();
        for (Student student : findall) {
            System.out.println(student);
        }*/
      /*  Student student = new Student(0, "彭帅", "男", "seletall");
        int i = studentDao.insertStudent(student);
        System.out.println(i);*/

     /*   Student student1 = studentDao.findbyid(35);
        System.out.println(student1);*/
     /*   List<Student> students = studentDao.findbyname("张三", "女");
        for (Student student : students) {
            System.out.println(student);
        }*/
        Map map = studentDao.find2();
        Set keys = map.keySet();
        Iterator iterator = keys.iterator();
        while(iterator.hasNext()){
            String key =(String) iterator.next();
            System.out.println(key+","+map.get(key));
        }
    }
}
